package com.linkhub.oms.admin.modules.logistic.freighttemplate.domain.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * 物流运费模板导入VO
 *
 * @author Frank
 */
@Data
@ApiModel("LogisticFreightTemplateExcelVO")
public class LogisticFreightTemplateExcelVO implements Serializable {

    @ApiModelProperty("failTotal")
    private Integer failTotal;

    @ApiModelProperty("successTotal")
    private Integer successTotal;

    public static LogisticFreightTemplateExcelVO failResult(int failTotal) {
        LogisticFreightTemplateExcelVO vo = new LogisticFreightTemplateExcelVO();
        vo.setFailTotal(failTotal);
        vo.setSuccessTotal(0);

        return vo;
    }

    public static LogisticFreightTemplateExcelVO successResult(int failTotal, int successTotal) {
        LogisticFreightTemplateExcelVO vo = new LogisticFreightTemplateExcelVO();
        vo.setFailTotal(failTotal);
        vo.setSuccessTotal(successTotal);

        return vo;
    }
}
